// calculate average of array

